<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3c.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
<h:head>
	<title>Real Estate Company</title>
	<meta http-equiv="Content-Type"
		content="application/xhtml+xml; charset=utf-8" />
	<meta name="description" content="Realestate Complaints" />
	<meta name="keywords" content="Realestate Complaints" />
	<meta name="language" content="de-AT" />

	<!--  CSS includes by JSF EL-->
	<h:outputStylesheet library="css" name="core.css" target="head" />
	<h:outputStylesheet library="css" name="fonts.css" target="head" />
	<h:outputStylesheet library="css" name="skinning.css" target="head" />
	<h:outputStylesheet library="css" name="wienerhelden.css" target="head" />
	<h:outputStylesheet library="css" name="workflow.css" target="head" />
	<h:outputStylesheet library="css" name="userSotivitiesDynamic.css"
		target="head" />

</h:head>
<h:body>
	<div id="wrapper">
		<div id="header">
			<h:link outcome="login.xhtml?faces-redirect=true"
				rendered="#{loginController.renderLogin}">
				<h:graphicImage name="logo.jpg" library="img" width="40px"
					height="40px" />
				<span class="headline"> Property Management Ltd.</span>
			</h:link>
			<h:link outcome="login.xhtml?faces-redirect=true"
				rendered="#{loginController.isLoggedIn}">
				<h:graphicImage name="logo.jpg" library="img" width="40px"
					height="40px" />
				<span class="headline"> Property Management Ltd. </span>
			</h:link>

		</div>
		<f:view>



			<h:form id="toolbar">


				<p:toolbar id="navigation" size="35" value="Menu" >
					<p:toolbarGroup align="left" rendered="#{loginController.isLoggedIn}">
						<p:menubar>
							<p:menuitem value="My Tasks" url="myTasks.xhtml" icon="ui-icon-star" rendered="#{poolController.showPools()}"/>
							<p:menuitem value="Open Tasks" url="openTasks.xhtml" icon="ui-icon-folder-open" rendered="#{poolController.showPools()}" />
							<p:menuitem value="Create Ticket" url="ticket.xhtml"
								icon="ui-icon-plusthick" rendered="#{poolController.showCreateTicket()}" />
							<p:menuitem value="Worker Tasks" url="workerTasks.xhtml" rendered="#{poolController.showWorkerTasks()}"/>
						</p:menubar>
					</p:toolbarGroup>
					<p:toolbarGroup align="right">



						<p:outputPanel styleClass="loginPanel" id="loginPanel"
							rendered="#{loginController.renderLogin}">
							<p:outputPanel styleClass="groupedInput">
								<!-- 							<p:outputLabel for="nickname" value="Username" /> -->
								<p:watermark for="username" value="Username..." />
								<p:inputText id="username" value="#{loginController.loginName}"
									label="username" maxlength="50">
								</p:inputText>
							</p:outputPanel>
							<p:outputPanel styleClass="groupedInput">
								<!-- 							<p:outputLabel for="password" value="Passwort" /> -->
								<p:watermark for="password" value="Passwort..." />
								<p:password id="password" value="#{loginController.loginPwd}"
									label="Password" maxlength="50" />
							</p:outputPanel>
							<p:commandButton update="loginPanel" value="Login"
								action="#{loginController.login}" />
						</p:outputPanel>

						<p:outputPanel id="userMenu"
							rendered="#{loginController.isLoggedIn}">

							<p:menuButton id="menuButton" value="Menu">
								<p:menuitem value="Mainpage"
									action="#{loginController.goToMainPage}" />

								<p:menuitem value="Log out" action="#{loginController.logout}" />

							</p:menuButton>

						</p:outputPanel>

					</p:toolbarGroup>
				</p:toolbar>
			</h:form>

		</f:view>
		<p:messages id="messages" showDetail="true" autoUpdate="true"
			closable="true">
			<p:effect type="fade" event="load" delay="2500" />
		</p:messages>
		<h:panelGroup layout="block" styleClass="#{css.background}"
			id="content">
			&nbsp;
			<ui:insert name="content">
	    	My content
	    </ui:insert>
		</h:panelGroup>
	</div>
</h:body>
</html>
